package com.dingqb.ktdemo.base

class ForDemo {

}

fun main() {
    var items = listOf("AA", "BB")
    for (i in items) {
        println("data==$i")
    }
    for (index in items.indices) {
        println("index==$index, data==${items[index]}")
    }
    for (i in 0 .. items.size-1 step 1){
        println("i==$i,get data==${items.get(i)}")
    }
    items.forEach {
        println(it)
    }
}